The Java 2 Platform, Enterprise Edition (J2EE) is a software standard for developing multitier enterprise applications. The J2EE architecture has a client tier, middle tier, and back-end tier. The client tier supports a variety of client types, and the middle tier supports client services and business logic through web and Enterprise Java Beans (EJB) containers in the middle tier. The back-end tier includes the Enterprise Information Systems (EIS) in the EIS tier and many standard Application Programming Interfaces (APIs) for accessing databases. An Enterprise Information System is generally any kind of computing system that offers high quality of service, deals with large volumes of data and capable of supporting some large organization (“an enterprise”). One of skill in the art can accordingly alter the objects and components resident on the several tiers. “Containers” are standardized runtime environments that provide services to components on the platform. All containers provide runtime support for responding to client requests and returning results to clients. The containers also provide APIs to support user session management.
Resident within the J2EE architecture is a “resource adapter” that plays a central role in the integration and connectivity between an EIS and an application server (software framework dedicated to the efficient execution of procedures for supporting the construction of applications) and serves as the point of contact between application components, application servers and enterprise information systems. A resource adapter and other components, must communicate with one another based on a standard referred to as the J2EE Connector Architecture (JCA). To enable seamless integration with an application server, the resource adapter abides by system-level “contracts” defined by the JCA. These contracts exist between the application server and the EIS, and are implemented through the resource adapter. The contracts specify how a system external to the J2EE platform integrates with it by supporting basic functions handled by the J2EE container. There are three major contracts: the “connection management contract” which allows applications to connect to an EIS, and enables the application server to utilize pooling; the “transaction management contract” which allows an application server to manage and perform transactional access across one to many EIS resource managers; and the “security contract” which provides support for secure access to the EIS.
On a J2EE platform, a “ManagedConnection” interface provides an application-level connection handle from the EIS to the resource adapter's ManagedConnection instance. The ManagedConnection instance represents a physical connection to the underlying EIS. A connection handle to the ManagedConnection instance is created for the application that requests a physical connection represented by the ManagedConnection instance. This connection handle is used by the application code to refer to the underlying physical connection. The ManagedConnection instance is associated with the connection handle until the connection handle is closed and the associated transaction (e.g., loading personalized data from a database) is terminated.
In certain situations, the transaction may take a considerable amount of time to complete. In such cases, the ManagedConnection object is idle without being actively engaged in any sort of work.
Attempts have been made to reduce or eliminate these idle times by disassociating the ManagedConnection object from its connection handles when the processing is completed regardless of whether the transaction is completed or not. For example, when a portal application acquires a connection to load all personalization data from a database, the ManagedConnection object would be disassociated from its connection handles for this connection when the processing is completed. However, the time it takes to process the data may be significantly greater than the time it takes to load the data thereby causing the ManagedConnection object to be idle for a significant period of time.
As a result, there are cases where the connection resources, such as the ManagedConnection object, are being underutilized.